package com.wonders.frame.chron.model.bo;
// default package

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.wonders.frame.core.model.IDefaultModel;
import com.wonders.frame.core.tags.ShowInView;
import com.wonders.frame.core.tags.ShowInView.OperateType;

/**
 * AfChVersion entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "AF_CH_VERSION")
public class Version implements IDefaultModel  {

	// Fields

	private Integer id;
	private String title;
	@ShowInView(name="修志类别",operateType=OperateType.SELECT,ccateType="chronType")
	private String chronType;
	private String version;
	@ShowInView(name="稿件类型",operateType=OperateType.SELECT,ccateType="pageType")
	private String type;
	private Date uploadDate = new Date(System.currentTimeMillis());
	private String uploader;
	private String unit;
	private String doc;
	private Integer removed;

	// Constructors

	/** default constructor */
	public Version() {
		this.removed = 0;
	}

	/** full constructor */
	public Version(String title, String chronType, String version,
			String type, Date uploadDate, String uploader, String unit,
			String doc, Integer removed) {
		this.title = title;
		this.chronType = chronType;
		this.version = version;
		this.type = type;
		this.uploadDate = uploadDate;
		this.uploader = uploader;
		this.unit = unit;
		this.doc = doc;
		this.removed = removed;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE,generator ="Generator")   
	@SequenceGenerator(name = "Generator", sequenceName  = "seq_af_ch_version",allocationSize=1)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "TITLE", length = 20)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CHRON_TYPE", length = 50)
	public String getChronType() {
		return this.chronType;
	}

	public void setChronType(String chronType) {
		this.chronType = chronType;
	}

	@Column(name = "VERSION", length = 10)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@Column(name = "TYPE", length = 10)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "UPLOAD_DATE", length = 7)
	public Date getUploadDate() {
		return this.uploadDate;
	}

	public void setUploadDate(Date uploadDate) {
		this.uploadDate = uploadDate;
	}

	@Column(name = "UPLOADER", length = 50)
	public String getUploader() {
		return this.uploader;
	}

	public void setUploader(String uploader) {
		this.uploader = uploader;
	}

	@Column(name = "UNIT", length = 50)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "DOC", length = 50)
	public String getDoc() {
		return this.doc;
	}

	public void setDoc(String doc) {
		this.doc = doc;
	}

	@Column(name = "REMOVED", precision = 22, scale = 0)
	public Integer getRemoved() {
		return this.removed;
	}

	public void setRemoved(Integer removed) {
		this.removed = removed;
	}

}